﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using UI.WinForm.Common;

namespace UI.WinForm.DayDatas
{
    public partial class frmAddData : BaseForm
    {
        public frmAddData()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            DayDatasService _cs = new DayDatasService();
            if (this.txtID.Text != "")
            {
                string newID = _cs.Insert(this.txtName.Text, double.Parse(this.txtPrice.Text));
                this.txtID.Text = newID.ToString();
            }

        }
    }
}
